﻿using DC2010.Objects;
using DC2010.Objects.Base;
using DC2010.Objects.Data;

namespace DC2010.Effects
{
    public class I_SigthRange_Effect : EffectLogic
    {
        public I_SigthRange_Effect(EffectData ed)
            : base(ed)
        {
            ShortName = "Increases sight range";
            LongName = "Creature will be able to react on another events from bigger distance.";
            EffectType = EffectType.Instant;
        }

        public override void Instant(BaseObject aInvoker, BaseObject aTarget)
        {
            if (aTarget is CreatureData)
            {
                CreatureData c = (CreatureData)aTarget;

                int inc = Data.Params.Find(A => A.Key == "VALUE").Value.ToInt();

                c.SightRange += inc;
            }

            base.Instant(aInvoker, aTarget);
        }
    }
}
